import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex);

const store = () => new Vuex.Store({
  state:{
    user_id: 0
  },
  mutations:{
    setUserId(state,payload){
      state.user_id=payload.userId;
    },
    resetUserId(state){
      state.user_id=0;
    }
  }
});
export default store;
